/**
 * 
 */
package com.sci.web.action.datareportseason;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Enterprise_Standard;
import com.sci.web.dao.DataReportM_StandardDao;

/**
 * @author  BaiFuyou
 * @date: Nov 5, 2011 10:06:27 AM
 * 
 * 更新标准数据
 */
public class UpdateStandardData_BaseInfoAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3659317791550697187L;
	@Resource
	private DataReportM_StandardDao dataReportM_StandardDao;
	private int sid;
	private int eid;
	private int standard_type;
	private int standard_participation_style;
	private String  standard_name;
	private String  standard_time;
	/**
	 * @return the sid
	 */
	public int getSid() {
		return sid;
	}
	/**
	 * @param sid the sid to set
	 */
	public void setSid(int sid) {
		this.sid = sid;
	}
	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}
	/**
	 * @param eid the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}
	/**
	 * @return the standard_type
	 */
	public int getStandard_type() {
		return standard_type;
	}
	/**
	 * @param standard_type the standard_type to set
	 */
	public void setStandard_type(int standard_type) {
		this.standard_type = standard_type;
	}
	/**
	 * @return the standard_participation_style
	 */
	public int getStandard_participation_style() {
		return standard_participation_style;
	}
	/**
	 * @param standard_participation_style the standard_participation_style to set
	 */
	public void setStandard_participation_style(int standard_participation_style) {
		this.standard_participation_style = standard_participation_style;
	}
	/**
	 * @return the standard_name
	 */
	public String getStandard_name() {
		return standard_name;
	}
	/**
	 * @param standard_name the standard_name to set
	 */
	public void setStandard_name(String standard_name) {
		this.standard_name = standard_name.trim();
	}
	/**
	 * @return the standard_time
	 */
	public String getStandard_time() {
		return standard_time;
	}
	/**
	 * @param standard_time the standard_time to set
	 */
	public void setStandard_time(String standard_time) {
		this.standard_time = standard_time.trim().substring(0, 10);
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		Enterprise_Standard es = new Enterprise_Standard();
		es.setEditable(1);
		es.setEnterprise_id(eid);
		es.setStandard_id(sid);
		es.setStandard_name(standard_name);
		es.setStandard_participation_style(standard_participation_style);
		es.setStandard_time(standard_time);
		es.setStandard_type(standard_type);
		if(dataReportM_StandardDao.updateEnterpriseStandardData(es)){
			super.outPrint("ok");
		}else{
			super.outPrint("fail");
		}
		return "json";
	}
}
